<%
session.removeAttribute("task");
String sid=request.getParameter("id")==null?"":request.getParameter("id");
%>
<jsp:useBean id="task" scope="session"
    class="com.knife.service.GenerateNewsTask"/>
<%
task.setSid(sid);
task.init();
task.setRunning(true); 
new Thread(task).start();
%>